<?php

namespace App\Models;


class EntrySurvey extends Orm
{
    //

    protected $table = 'entry_survey';
    protected $dateFormat = 'U';
    public $timestamps = true;

    public $casts = [
        'content' => 'json'
    ];

    public function getContentAttribute()
    {
        $content = json_decode($this->attributes['content'], true);
        foreach ($content as &$item) {
            $item = json_decode($item, true);
        }
        unset($item);
        return $content;
    }
}
